package cn.itcast.dao;

import cn.itcast.pojo.Member;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @Author: ZHT
 * @Dtae: 2021/11/15 16:54
 * @Version: 1.0
 */
public interface MemberDao {


    Page<Member> findPage ();

    Page<Member> findTj (Object tj);

    Member tanchu (Integer id);

    Boolean update (Member member);

    Boolean add (@Param("member") Member member , @Param("date") Date date);

    Boolean updateStatus(@Param("userId")Integer userId, @Param("status")Integer status);

    /**
     * 查询指定月会员数量
     */
    Integer selectMemberCount(@Param("value") String month,@Param("value1")String month1);


    /**
     * 查询本月新增会员
     * @param month
     * @param month1
     * @return
     */
    List<Member> selectNewMemberMonth(@Param("value") String month,@Param("value1") String month1);


    /**
     * 查询会员总数
     */
    Integer selectMemberTotal();



    /**
     * 查询该天是否有新注册会员
     */
    List<Member> selectHaveNew(String date);


    /**
     * 查询该周是否有新注册会员
     */

    List<Member> selectHaveNewInWeek(@Param("value") String startWeek,@Param("value1") String endWeek);


}
